<template>
    <div>
        <!-- 面包屑 -->
        <el-breadcrumb :separator-icon="ArrowRight">
            <el-breadcrumb-item :to="{ path: 'home' }">学生</el-breadcrumb-item>
        </el-breadcrumb>
        <h2 style="border-bottom: 1px solid;padding-bottom: 10px;">实践过程管理系统</h2>

        <div style="margin-left: 5%;">
            <h1 style="color: #545c64;font-size: xxx-large;">欢迎登陆实践过程管理系统</h1>
            <div style="margin-top: 1%; width:60%;margin-left: 5%;">
                <h3>选题步骤</h3>
                <el-steps finish-status="wait" active=7 align-center>
                    <el-step title="组队" />
                    <el-step title="选题" />
                    <el-step title="过程任务" />
                    <el-step title="提交过程报告" />
                    <el-step title="提交最终报告" />
                    <el-step title="学生互评" />
                    <el-step title="查看成绩" />
                </el-steps>
                <el-text type="info">注：课程设计任务不需要组队</el-text>
            </div>
        </div>

    </div>
</template>
<script setup>
import { ref } from 'vue';

const practicalTask = ref([
    {
        courseName: '算法课程设计',
        practicalType: '0',
        adviserName: 'A老师',
        teacherPhone: '13911111111',
        onloadDate: '2023-4-15',
    }
])

//时间格式化
function formatDate(row, column, cellValue, index) {
    let format = 'YYYY-mm-dd'
    let date = new Date(cellValue);
    const dataItem = {
        'Y+': date.getFullYear().toString(),
        'm+': (date.getMonth() + 1).toString(),
        'd+': date.getDate().toString(),
    }
    Object.keys(dataItem).forEach((item) => {
        const ret = new RegExp(`(${item})`).exec(format);
        if (ret) {
            format = format.replace(ret[1], ret[1].length === 1 ? dataItem[item] : dataItem[item].padStart(ret[1].length, '0'));
        }
    });
    /*  dateFilters.value = format */
    //时间选择栏
    /*  let dateFilters = ref([])
     dateFilters = format */
    // for(let i=0 ; i<myPublish.length;i++){
    //   const obj = ref([])
    //   obj.text = 
    /*   myPublish.value.courseDate = ref(format);
      console.log(myPublish.value.courseDate) */
    return format
}

//事件类型格式化
function formatType(row, column, cellValue, index) {
    if (cellValue == 0) {
        const theTpye = '课程设计任务'
        return theTpye
    } else if (cellValue == 1) {
        const theTpye = '校内实践课题'
        return theTpye
    } else if (cellValue == 2) {
        const theTpye = '校外实践课题'
        return theTpye
    } else {
        const theTpye = '实践任务'
        return theTpye
    }



}


</script>